#ifndef SPI_H
#define SPI_H
#include "ht32f5xxxx_01.h"
#include "ht32f5xxxx_spi.h"
void SPI_Configuration(void);
typedef struct SPI_Device
{
    void *          SPI_Base;
    SPI_InitTypeDef SPI_Info;
}SPI_Device;
#define _SPI_SendData(device, data)       \
                                SPI_SendData(device.SPI_Base, data)
#define _SPI_Init(device)                 \
                                SPI_Init(device.SPI_Base, &(device.SPI_Info))
#define _SPI_RecieveData(device)          \
                                SPI_ReceiveData(device.SPI_Base)
#define _SPI_GetStatusFlag(device,status) \
                                SPI_GetFlagStatus(device.SPI_Base, status)
#endif
